/** 加载css */
var loadCSS = (src) => {
    let link = document.createElement('link')
    link.rel = 'stylesheet'
    link.type = 'text/css'
    link.href = src
    document.getElementsByTagName('head')[0].appendChild(link)
}

/** 加载js */
var loadJS = src => {
    const script = document.createElement('script')
    script.src = src
    document.head.appendChild(script)
}

$(document).ready(function () {
    /** 页面顶部 语言切换 */
    $('body').on('click', '.circle-box.mobile', function (event) {
        $('.header-top .top-box').toggleClass('active')
    })
    $('.header-top .circle-box').on('click', '.circle-item', function (event) {
        let innerHtml = $(event.currentTarget).html()
        $('.header-top .top-box').toggleClass('active')
        $('.header-top .mobile .circle-item').html(innerHtml)
    })
    $('.navbar .icon-menu').on('click', function () {
        $('.navbar .link-box').toggleClass('active')
    })
    $('.navbar .link-box').on('click', 'li', function () {
        $('.navbar .link-box').removeClass('active')
    })
})